package com.kfm.base.loop;

public class Demo05 {

    public static void main(String[] args) {
        /*
           6   1     2 * (6 - row) + 1
           5   3
           4   5
           3   7
           2   9
           1   11
           0   13
         */

        for (int row = 6; row >= 0; row --){
            // 空格
            for (int i = 1; i <= 2 * row; i ++){
                System.out.print(" ");
            }
            // *
            for (int i = 1; i <= 2 * (6 - row) + 1; i ++){
                System.out.print("* ");
            }
            System.out.println();
        }
    }
}
